import { Layout } from "antd";
import { capitalize } from "@cocalc/util/misc";
import Footer from "components/landing/footer";
import Head from "components/landing/head";
import Header from "components/landing/header";
import Licenses from "components/licenses/layout";
import { Customize } from "lib/customize";
import withCustomize from "lib/with-customize";
export default function Preferences({ customize, page }) {
const subpage = page[0] != null ? ` – ${capitalize(page[0])}` : "";
return (
<Customize value={customize}>
<Head title={`Licenses${subpage}`} />
<Layout>
<Header />
<Licenses page={page} />
<Footer />
</Layout>
</Customize>
);
}
export async function getServerSideProps(context) {
let { page } = context.params;
if (page == null) {
page = [];
}
return await withCustomize({ context, props: { page } });
}